import request from '@/utils/request'

// 查询项目关键指标规划列表
export function listDealIndex(query) {
  return request({
    url: '/index/dealIndex/list',
    method: 'get',
    params: query
  })
}

// 查询项目关键指标规划详细
export function getDealIndex(id, type) {
  return request({
    url: '/index/dealIndex/getInfo?id=' + id + '&type=' + type,
    method: 'get'
  })
}

// 保存项目关键指标规划
export function saveDealIndex(data) {
  return request({
    url: '/index/dealIndex/save',
    method: 'post',
    data: data
  })
}

// 删除项目关键指标规划
export function delDealIndex(id) {
  return request({
    url: '/index/dealIndex/' + id,
    method: 'delete'
  })
}

// 导出项目关键指标规划
export function exportDealIndex(query) {
  return request({
    url: '/index/dealIndex/export',
    method: 'get',
    params: query
  })
}
// 删除业态列表
export function dealIndexActivities(id) {
  return request({
    url: '/activities/dealIndexActivities/' + id,
    method: 'delete'
  })
}
// 删除股东列表
export function dealIndexDetails(id) {
  return request({
    url: '/details/dealIndexDetails/' + id,
    method: 'delete'
  })
}

// 查询项目指标进度监控
export function getIndexMonitor(dealId) {
  return request({
    url: '/index/dealIndex/indexMonitor/' + dealId,
    method: 'get'
  })
}
